package TrackModel;

public class TransponderBlock extends Block
{
	private String nextStop;
	public TransponderBlock (String[] theBlock)
	{
		super(theBlock);
		nextStop = theBlock[9];
	}
	/**
	 * The purpose of this class is to begin the stopping process for the tram to arrive at the station </br>
	 * It provides one simple method to run on each tick signalTrainStop, which should be picked up by the TrainModel </br>
	 * It currently does not account for which direction the train is coming from, so it will give a TrainStop signal to trains on bidirectional track exiting a station </br>
	 * @return nextStop - Returns the next station if there is a train on the block
	 */
	public String signalTrainStop()
	{
		if(this.hasTrain == true)
		{
			return nextStop;
		}
		else
		{
			return null;
		}
	}
}
